﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace SoonCode.FocusTest.Views
{
    public class BaseWindow:Window
    {
        public BaseWindow():base()
        {
            this.Initialized += BaseWindow_Initialized;
        }

        private void BaseWindow_Initialized(object? sender, EventArgs e)
        {
            fullWindow();
        }

        protected void fullWindow()
        {
            // 设置全屏
            this.WindowState = System.Windows.WindowState.Normal;
            this.WindowStyle = System.Windows.WindowStyle.None;
            this.ResizeMode = System.Windows.ResizeMode.CanMinimize;
            this.ResizeMode = ResizeMode.NoResize;
            //抓住焦点
            //this.Topmost = true;
            this.Left = 0.0;
            this.Top = 0.0;
            this.Width = System.Windows.SystemParameters.PrimaryScreenWidth;
            this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
        }
        
    }
}
